package day12;

public class TestInteger {
    public static void main(String[] args) {
        Integer i1=new Integer(25);
        Integer i2=Integer.valueOf(25);
        System.out.println(i1 == i2);//false
        Integer i3=Integer.valueOf(25);
        System.out.println(i2==i3);//true
        Integer i4=Integer.valueOf(555);
        Integer i5=Integer.valueOf(555);
        System.out.println("*********");
        System.out.println(i4 == i5);//false
        System.out.println(i4.equals(i5));
        Double d1=Double.valueOf(1.11);
        Double d2=Double.valueOf(1.11);
        System.out.println("****");
        Byte b1=Byte.valueOf("1");
        Byte b2=Byte.valueOf("1");
        System.out.println(b1.equals(b2));
        System.out.println("*****");
        Short s1=Short.valueOf("12");
        Short s2=Short.valueOf("12");
        System.out.println(s1.equals(s2));
        System.out.println("*******");
        Long l1=Long.valueOf(111);
        Long l2=Long.valueOf(111);
        System.out.println(l1.equals(l2));
        System.out.println("hahaha");
        Float f1=Float.valueOf("3.22");
        Float f2=Float.valueOf("3.22");
        System.out.println(f1.equals(f2));
        System.out.println(d1 == d2);//false
        System.out.println(d1.equals(d2));//true
        System.out.println(d1.equals(d2));//true

    }
}
